package com.xuecheng.api.cms;

import com.xuecheng.framework.domain.cms.CmsPage;
import com.xuecheng.framework.domain.cms.request.QueryPageRequest;
import com.xuecheng.framework.domain.cms.response.CmsPageResult;
import com.xuecheng.framework.model.response.QueryResponseResult;
import com.xuecheng.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

@Api(value="cms 页面管理接口")
public interface CmsPageControllerApi {
    @ApiOperation("分页查询页面")
    @ApiImplicitParams({
            @ApiImplicitParam(name="page", value="页码", required = true, paramType = "path", dataType = "int"),
            @ApiImplicitParam(name="size", value="每页记录数", required = true, paramType = "path", dataType = "int")
    })
    QueryResponseResult findList(int page, int size, QueryPageRequest queryPageRequest);

    @ApiOperation("添加页面")
    CmsPageResult add(CmsPage cmsPage);

    @ApiOperation("主键查询")
    CmsPage findById(String pageId);

    @ApiOperation("根据主键修改")
    CmsPageResult edit(String pageId, CmsPage cmsPage);

    @ApiOperation("根据主键删除")
    ResponseResult delete(String pageId);

    @ApiOperation("发布页面")
    ResponseResult post(String pageId);
}
